import json

from CloudEngine.IO.IVTUReader import IVTUReader
from CloudEngine.IO.JsonTransformer import JsonTransformer
from service.utils.file import write_file


def read_vtu(url: str) -> str:
    path = url
    reader = IVTUReader(path)
    json_dct = JsonTransformer.poly_data_to_json(reader.output())
    write_file("./tmp/test.json", json.dumps(json_dct))
    return ""
